﻿<Window x:Class="conti.maurizio._4BI.Figure.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" 
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <Storyboard x:Key="Storyboard1">
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="regularPolygon">
                <EasingColorKeyFrame KeyTime="0" Value="#FFF4F4F5"/>
                <EasingColorKeyFrame KeyTime="0:0:1" Value="#FF2828D0"/>
            </ColorAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="regularPolygon">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="360"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="UIElement.MouseLeftButtonDown" SourceName="regularPolygon">
            <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
        </EventTrigger>
    </Window.Triggers>
    <Grid>
        <Button Content="Button" Height="110" HorizontalAlignment="Left" Margin="12,29,0,0" x:Name="button1" VerticalAlignment="Top" Width="206" Click="button1_Click" >
            <Button.Background>
                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                    <GradientStop Color="#FFF3F3F3" Offset="0"/>
                    <GradientStop Color="#FFEBEBEB"/>
                    <GradientStop Color="#FF9F1717" Offset="0.828"/>
                    <GradientStop Color="#FF1A4AE0" Offset="0.996"/>
                </LinearGradientBrush>
            </Button.Background>
        </Button>
        <Button Content="Button" Height="110" HorizontalAlignment="Left" Margin="244,139,0,0" x:Name="button2" VerticalAlignment="Top" Width="206" Click="button1_Click" />
        <ed:RegularPolygon x:Name="regularPolygon" Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="97" InnerRadius="0.47211" Margin="15,0,0,68" PointCount="5" Stretch="Fill" Stroke="Black" VerticalAlignment="Bottom" Width="106" MouseLeftButtonDown="RegularPolygon_MouseLeftButtonDown" RenderTransformOrigin="0.5,0.5" >
            <ed:RegularPolygon.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </ed:RegularPolygon.RenderTransform>
        </ed:RegularPolygon>
        <ListBox Height="100" HorizontalAlignment="Left" Margin="224,22,0,0" Name="listBox1" VerticalAlignment="Top" Width="120" />
        <Menu Height="23" HorizontalAlignment="Left" Name="menu1" VerticalAlignment="Top" Width="200" />
    </Grid>
</Window>
